package com.my_test.webmagic.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import redis.clients.jedis.JedisPool;

/**
 * @author zhangyalin@act-telecom.com
 * @since 2019-05-27 18:29
 **/
@Configuration
public class RedisConfig {

    @Value("${spring.redis.host}")
    private String host;
    @Value("${spring.redis.port}")
    private Integer port;


    @Bean
    public JedisPool jedisPool() {
        return new JedisPool(host, port);
    }
}
